package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.dubbo.mappers.AnnouncementMapper;
import com.tanhua.model.domain.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author SunSun
 * @date 2021/10/31
 */
@DubboService
public class AnnouncementApiImpl implements AnnouncementApi {
    @Autowired
    private AnnouncementMapper announcementMapper;
    @Override
    public IPage<Announcement> announcements(Integer page, Integer pagesize) {
        Page page1=new Page(page,pagesize);
        return announcementMapper.findAnnouncement(page1);
    }
}
